<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="redis" uri="http://www.shopjsp.com/redisTag/functions" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<c:set var="basePath" value="${redis:getSysConfig('base_path_back')}"/>
<script type="text/javascript">
    /**
     * 查看结算说明信息
     */
	<shiro:hasPermission name="back_gotoShopSettlementDetailPage_settlement">
    function queryPaymentInfo(){
        /**获取选中行的id**/
        var selectedRow = $("#tt").bootstrapTable('getSelections');
        if (selectedRow.length == 1) {
            $("#btn_queryPaymentInfo").attr("data-target", "#detailModal");/**选中了记录后才可打开对应的模态框**/
            $.ajax({
                type: "POST",
                dataType: "JSON",
                url: "${basePath}/back/shopSettlement/getShopSettlementDetailObject.sjson",
                data: {settlementId:selectedRow[0].settlementId},
                success: function(result){
                    var data = JSON.parse(result.data);
                    $("#d_paymentInfo").empty().html(data.paymentInfo);
                }
            });
        } else {
            $("#btn_queryPaymentInfo").attr("data-target", "");/**没有选中记录关闭对应的模态框**/
            showMsg("请选择一行记录！");
        }

    }
	</shiro:hasPermission>
</script>

<!--详情模态框（Modal） -->
<div class="modal fade" id="detailModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog" style="width:70%">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
				<h5 class="modal-title" id="myModalLabel">结算信息</h5>
			</div>
			<div class="modal-body">
				<table id="detailTable" align="center" class="addOrEditTable table table-bordered" style="width:100%;">
					<div style="margin-left: 5%;margin-right: 5%; width: 90%;">
						<textarea id="d_paymentInfo" rows="5" cols="" style="width: 85%; margin-top: 0px;" disabled="disabled" ></textarea>
					</div>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>